{% extends 'console/work_area.html' %}
{% block work_ctr %}
    ng-controller='ProjectsController'
{% endblock %}

{% block a_title %}
    <h3><i class="inbox icon"></i>项目管理 </h3>
{% endblock %}

{% block work_space %}
    <div class="main_panel scoller-panel">
        <div class="projs_panel" ng-show="projects && projects.length !== 0">



             <div class="proj" ng-hide="(projects | filter:{is_star:true}).length == 0">
                 <div class="proj_header">
                    <i class="star icon"></i>常用项目 <span class="badge">{$ (projects | filter:{is_star:true}).length $}</span>
                 </div>
                 <div class="proj_grid">
                        <div class="proj_item" ng-repeat=" project in projects | filter:{is_star:true} ">
                            <a class="proj_star" ng-class="{true:'fav'}[project.is_star]" ng-click="js_toggle_project_fav(project)">
                                <i class="star icon"></i>
                            </a>
                            <a class="proj_center" ng-href="/project/{$ project.id $}">
                                    <i ng-class="project.icon" class="icon"></i>
                                <h4> {$ project.name $} </h4>
                            </a>

                        </div>
                 </div>
             </div>

            <div class="proj">
                 <div class="proj_header">
                    <i class="inbox icon"></i>全部项目 <span class="badge">{$ projects.length $}</span>
                 </div>
                 <div class="proj_grid">
                        <div class="proj_item" ng-repeat=" project in projects ">
                            <a class="proj_star" ng-class="{true:'fav'}[project.is_star]" ng-click="js_toggle_project_fav(project)">
                                <i class="star icon" ng-class="{false:'empty'}[project.is_star]"></i>
                            </a>
                            <a class="proj_center" ng-href="/project/{$ project.id $}">
                                    <i ng-class="project.icon" class="icon"></i>
                                <h4> {$ project.name $} </h4>
                            </a>

                        </div>
                 </div>
             </div>


        </div>
        <div class="empty_panel" ng-hide="projects || projects.length === 0">
                <i class="inbox icon"></i>
            <br>
            <span> 没有参与的项目</span>
        </div>
    </div>


{% endblock %}